import request from '@/utils/request'

export default {
  getChapterList(courseId) {
    return request({
      url: `/eduservice/chapter/chapterlist/${courseId}`,
      method: 'get'
    })
  },
  addChapter(chapter) {
    return request({
      url: `/eduservice/chapter/addChapter`,
      method: 'post',
      data: chapter
    })
  },
  getChapterInfo(id) {
    return request({
      url: `/eduservice/chapter/getChapterById/${id}`,
      method: 'get'
    })
  },
  updateChapter(chapter) {
    return request({
      url: `/eduservice/chapter/updateChapter`,
      method: 'post',
      data: chapter
    })
  },
  deleteChapter(id) {
    return request({
      url: `/eduservice/chapter/deleteChapter/${id}`,
      method: 'delete'
    })
  },
  deleteAliyunVideo(id) {
    return request({
      url: `/eduvod/video/deleteVideoById/${id}`,
      method: 'delete'
    })
  }
}
